home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / ForCLI / MCommands_1_0.lha / Install MCommands < prev    next >
Encoding:
Text File  |  1994-03-19  |  2.1 KB  |  113 lines

  1. ; Installer script for MCommands
  2. ; $VER: Install MCommands 37.1 (20.3.94)
  3.  
  4. (set @default-dest "C:")
  5.  
  6. (set commdir "C/")
  7.  
  8. ; ***************************************************************************
  9. ; English strings
  10.  
  11. (set #bad-kick
  12.     (cat "You must have AmigaDOS 2.04 or higher to use MCommands!")
  13. )
  14.  
  15. (set #welcome
  16.     (cat "\nMCommands installation\n\n\n"
  17.        "This script installs MCommands 1.0\n"
  18.        "on your Amiga.\n\n\n\n"
  19.        "MCommands package is\n"
  20.        "Copyright © 1994 Michael Letowski\n"
  21.        "All rights reserved.\n\n")
  22. )
  23.  
  24. (set #where-commands
  25.     (cat "Where should MCommands be installed?")
  26. )
  27.  
  28. (set #where-help
  29.     (cat "\nBy default, all CLI commands are placed in C:"
  30.        " logical directory. Hovewer, the commands can be"
  31.        " placed in any directory, as long as it is added to"
  32.        " search path by using \"Path\" command.\n\n")
  33. )
  34.  
  35. (set #which-commands
  36.     (cat "Which MCommands should be installed?")
  37. )
  38.  
  39. (set #which-commands-help
  40.     (cat "\n\n\"ChangeFont\" replaces topaz.font with user supplied one;"
  41.        "\n\n\"ClickStart\" enables/disables AmigaDOS features;"
  42.        "\n\n\"Examine\" checks type of file;"
  43.        "\n\n\"For\" executes a command for multiple arguments;"
  44.        "\n\n\"Touch\" changes date of file creation.\n\n\n")
  45. )
  46.  
  47. ; ***************************************************************************
  48. ; Install MCommands
  49.  
  50. ; Check AmigaDOS version
  51. (if (< (/ (getversion) 65536) 37)
  52.     (
  53.         (abort #bad-kick)
  54.     )
  55. )
  56.  
  57. (complete 0)
  58.  
  59. (message #welcome)
  60.  
  61. (welcome)
  62. (set old_level @user-level)
  63.  
  64. (user 2)
  65. (set mcommandsdir
  66.     (askdir
  67.         (prompt #where-commands)
  68.         (help #where-help)
  69.         (default @default-dest)
  70.     )
  71. )
  72.  
  73. (set commands
  74.     (askoptions
  75.         (prompt #which-commands)
  76.         (help #which-commands-help @askoptions-help)
  77.         (choices
  78.             "ChangeFont"
  79.             "ClickStart"
  80.             "Examine"
  81.             "For"
  82.             "Touch")
  83. ;        (default )
  84.     )
  85. )
  86.  
  87. (user old_level)
  88. (set n 0)
  89. (while
  90.     (set comm
  91.         (select n
  92.             "ChangeFont"
  93.             "ClickStart"
  94.             "Examine"
  95.             "For"
  96.             "Touch"
  97.             "")
  98.     )
  99.     (
  100.         (if (IN commands n)
  101.             (copyfiles
  102.                 (source (cat commdir comm))
  103.                 (dest mcommandsdir)
  104.             )
  105.         )
  106.         (set n (+ n 1))
  107.         (complete (* n 20))
  108.     )
  109. )
  110.  
  111. (complete 100)
  112. (exit)
  113.